﻿using NicoView.Model.Share.MediaEncoders;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NicoView.Model.Platform.MediaEncoders
{
    public class NicoViewBrodcastEncodersFactory : IBroadcastMediaEncoderFactory
    {

#if NETFX
        private IBroadcastMediaEncoderProvider[] encoders = { new NiconicoLiveEncoderProvider() };
#else
        private IBroadcastMediaEncoderProvider[] encoders = { };
#endif

        private static IBroadcastMediaEncoderFactory current = null;


        public static IBroadcastMediaEncoderFactory Current
        {
            get
            {
                if (current == null)
                {
                    current = new NicoViewBrodcastEncodersFactory();
                }

                return current;
            }
        }


        public IEnumerable<IBroadcastMediaEncoderProvider> CreateEncoders()
        {
            return this.encoders;
        }
    }
}
